home *** CD-ROM | disk | FTP | other *** search
- Path: news.val.net!usenet
- From: agriffini@vv.val.net (Andrea Griffini)
- Newsgroups: comp.lang.c,comp.graphics.algorithms,rec.games.programmer
- Subject: Re: Speed question here...
- Date: Mon, 19 Feb 1996 20:10:06 GMT
- Organization: ?
- Message-ID: <4g9rbg$3cl@ooze.val.net>
- References: <4ftluh$1gkv@hearst.cac.psu.edu>
- Reply-To: agriffini@vv.val.net
- NNTP-Posting-Host: ppp0.val.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- koscho@wjk130.rh.psu.edu (William Koscho) wrote:
-
- >I was curious as to how fast something like the
- >following would execute:
-
- > int x;
- > node *ptr; ptr in linked list
-
- > for ( ptr = first_node; ptr != NULL; ptr = ptr.next ) {
- > for ( x = 0; x < max; x++ ) {
- > array[x] = array_other[x];
- > }
- > }
-
- >I really am not interested in the assignment statement, that's easy.
- >but the traversal through the linked list, and inner integer incremental
- >for loop for each node visited. How fast is a traversal through
- >a linked list when you do a for loop at each node?
-
- >thanks
-
- Not blazing fast but fast enough
-
- :)
-
- BTW: Both if this question has any sense or not (my opinion is that
- hasn't)... is anyway graphic related ?
-
- --------------------------------------------------_
- Andrea Griffini agriffini@vv.val.net \_
- programmer a.griffini@agora.stm.it \_
- http://vv.val.net/~agriffini \
-
-